/*
 * Test multi-dimension array access.
 */
const int K1806[3][5] = {
	{7, 5, 0, 3, 8},
	{6, 4, 5, 2, 0},
	{6, 4, 1, 2, 0}
};

double CR400BF[6] = {
	5000.0, 0.0, 30.0, 3.0, 0.0, 0.05
};

bool CR220J[2][3][1] = {true, true, false, true, false, true};

int sum_a_row_i5(int A[5])
{
	int s = 0; int j = 0;
	while (j < 5)
	{
		s = s * 10 + A[j];
		j = j + 1;
	}
	return s;
}

double sum_a_row_d(double A[], int n)
{
	double s = 0.0; int j = 0;
	while (j < n)
	{
		s = s + A[j];
		j = j + 1;
	}
	return s;
}

int main()
{
	int i;
	int si;
	double sd;
	// enter: 0, 1 or 2
	i = get_int();
	si = sum_a_row_i5(K1806[i]);
	sd = sum_a_row_d(CR400BF, i * 3);
	CR400BF[i * 2] = 5033.05;
	print_int(si);
	print_double(sd);
	print_double(CR400BF[i * 2]);
	print_bool(CR220J[1][2][0]);
	print_bool(CR220J[0][0][0]);
	print_bool(CR220J[1][i][0]);
	print_bool(CR220J[i][2][0]);
	CR220J[i][2][0] = !CR220J[i][2][0];
	print_bool(CR220J[i][2][0]);
	return 0;
}